﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class RichengBLL : BaseBLL<Richeng>
    {
        public Richeng entity = new Richeng();
        RichengDAO dao = new RichengDAO();
        public override Richeng GetModel()
        {
            return entity;
        }
        /// <summary>
        /// 查询历史日程
        /// </summary>
        /// <param name="state"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Richeng> GetListPagingHistory(int state,int userid, int page, int pagesize)
        {
            return dao.GetListPagingHistory(state,userid, page, pagesize);
        }
        /// <summary>
        /// 
        ///查询降到日程
        /// </summary>
        /// <param name="state"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Richeng> GetListPagingFuture(int state,int userid, int page, int pagesize)
        {
            return dao.GetListPagingFuture(state, userid, page,pagesize);
        }

        /// <summary>
        /// 查询历史日程个数
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPagingHistory(int state,int userid)
        {
            return dao.GetListPagingHistory(state, userid);
        }

        /// <summary>
        /// 查询将到日程个数
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPagingFuture(int state,int userid)
        {
            return dao.GetListPagingFuture(state,userid);
        }


        /// <summary>
        /// 查询待完成日程
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Richeng> GetListPaging(int userid, bool isPub, bool isDel, int page, int pagesize)
        {
            return dao.GetListPaging(userid, isPub, isDel, page, pagesize);
        }


        /// <summary>
        /// 查询已删除日程数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, bool isPub, bool isDel)
        {
            return dao.GetListPaging(userid, isPub, isDel);
        }


        public IList<Richeng> GetListPaging(int userid,  bool isDel, int page, int pagesize)
        {
            return dao.GetListPaging(userid,  isDel, page, pagesize);
        }


        /// <summary>
        /// 查询已删除日程数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPaging(int userid,  bool isDel)
        {
            return dao.GetListPaging(userid, isDel);
        }

        /// <summary>
        /// 查询全部日程
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<Richeng> GetListPaging(int userid, int page, int pagesize)
        {
            return dao.GetListPaging(userid, page, pagesize);
        }

        /// <summary>
        /// 查询全部日程个数
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPaging(int userid)
        {
            return dao.GetListPaging(userid);
        }




        // <summary>
        /// 批量修改暂存
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchRichengUpdate(string ids)
        {
           return dao.BatchRichengUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchRichengDelete(string ids)
        {
            return dao.BatchRichengDelete(ids);
        }


        public Boolean BatchRRichengUpdate(string ids)
        {
            return dao.BatchRRichengUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchRRichengDelete(string ids)
        {
            return dao.BatchRRichengDelete(ids);
        }
    }
}
